package com.xmtlxx.oms.mapper;

import com.xmtlxx.oms.domain.PropertyLog;
import com.xmtlxx.oms.domain.bo.PropertyLogBo;
import com.xmtlxx.oms.domain.vo.PropertyLogVo;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.xmtlxx.common.core.mapper.BaseMapperPlus;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * 财物日志Mapper接口
 *
 * @author xmtlxx
 * @date 2022-11-28
 */
public interface PropertyLogMapper extends BaseMapperPlus<PropertyLogMapper, PropertyLog, PropertyLogVo> {
    /**
     * 根据条件分页查询财物日志
     *
     * @param propertyLog 财物日志
     * @return Page PropertyLog
     */
//    @DataPermission({
//        @DataColumn(key = "tenantName", value = "p.create_by"),
//        @DataColumn(key = "deptName", value = "p.dept_id"),
//        @DataColumn(key = "userName", value = "p.create_by")
//    })
    Page<PropertyLogVo> selectPagePropertyLogList(@Param("page") Page<PropertyLog> page,@Param("propertyLog") PropertyLogBo propertyLog);

    /**
     * 查询财物日志列表
     *
     * @param propertyLog 财物日志
     * @return 财物日志集合
     */
//    @DataPermission({
//        @DataColumn(key = "tenantName", value = "p.create_by"),
//        @DataColumn(key = "deptName", value = "p.dept_id"),
//        @DataColumn(key = "userName", value = "p.create_by")
//    })
    List<PropertyLogVo> selectPropertyLogList(@Param("propertyLog") PropertyLogBo propertyLog);

    PropertyLogVo selectPropertyLogVoByID(String id);

    List<PropertyLog> propertyLogList(@Param("propertyLog") PropertyLogBo propertyLog);

    int updatePropertyLog(@Param("propertyLog") PropertyLog propertyLog);
    int updatePropertyLogBatchById(@Param("list") List<PropertyLog> propertyLogs);
}
